package solutions


object Euler003s{
	
	def main(args: Array[String]) {
  
	  var rest: BigInt = BigInt("600851475143")
	  var number: Long = 2
	  
	  while(number < rest){
	    if(rest%number == 0)
	      rest = rest / number;
	    else
	      number += 1;
	  }
	  
	  println("Answer: " + rest.toString());
	  
	}
	
}